package com.laolang.pluto.common.persist.entity;

import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.laolang.pluto.common.web.jackson.LocalDateTimeDeserialize;
import com.laolang.pluto.common.web.jackson.LocalDateTimeSerialize;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author laolang
 * @date 2021-07-2021/7/31 18:59
 */
@NoArgsConstructor
@Data
public class BaseEntity {

    /**
     * id
     */
    private Long id;

    /**
     * 创建人
     */
    private Long createBy;

    /**
     * 创建时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserialize.class)
    @JsonSerialize(using = LocalDateTimeSerialize.class)
    private LocalDateTime createTime;

    /**
     * 最后修改人
     */
    private Long updateBy;

    /**
     * 最后修改时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserialize.class)
    @JsonSerialize(using = LocalDateTimeSerialize.class)
    private LocalDateTime updateTime;

    /**
     *
     */
    @Version
    private Integer version;
}
